﻿using UnityEngine;
using System.Collections;

public class MovePlayer : MonoBehaviour {

	public float maxSpeed = 10.0f;				// The fastest the player can travel in the x axis.
				
	void Awake()
	{



	}
	
	
	void Update()
	{
		if(Input.GetKey(KeyCode.UpArrow))
		{
			transform.Translate(new Vector3(0,+maxSpeed,0) * Time.deltaTime);
		}

		else if(Input.GetKey(KeyCode.DownArrow))
		{
			transform.Translate(new Vector3(0,-maxSpeed,0) * Time.deltaTime);
		}

		else if(Input.GetKey(KeyCode.LeftArrow))
		{
			transform.Translate(new Vector3(-maxSpeed,0,0) * Time.deltaTime);
		}

		else if(Input.GetKey(KeyCode.RightArrow))
		{
			transform.Translate(new Vector3(+maxSpeed,0,0) * Time.deltaTime);
		}
	}
	


}
